using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Icodeon.Scorm2CC.GUI
{
    public partial class AboutDialog : Form
    {
        public AboutDialog()
        {
            InitializeComponent();
        }

        private void Open(Uri uri)
        {
            try
            {
                System.Diagnostics.Process.Start(uri.OriginalString);
            }
            catch (System.ComponentModel.Win32Exception noBrowser)
            {
                if (noBrowser.ErrorCode == -2147467259)
                    MessageBox.Show(noBrowser.Message);
            }
            catch (System.Exception other)
            {
                MessageBox.Show(other.Message);
            }
        }

        private void ccaLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Open(new Uri("http://www.imsglobal.org/cc/alliance.html"));
        }

        private void scorm2ccLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Open(new Uri("http://www.codeplex.com/scorm2cc"));
        }

        private void icodeonLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Open(new Uri("http://www.icodeon.com"));
        }

        private void psydevLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Open(new Uri("http://www.psydev.com"));
        }

        private void okButton_Click(object sender, EventArgs e)
        {
            this.Hide();
            this.Dispose();
        }
    }
}